package com.lanou.myapp.news.funnynews.contentfunnynews;

import android.content.Intent;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.webkit.WebView;
import android.webkit.WebViewClient;

import com.lanou.myapp.R;

/**
 * Created by dllo on 16/1/19.
 */
public class ContentFunnyNewsActivity extends AppCompatActivity{
    private WebView webView;
    private String url = "http://interfacev5.vivame.cn/x1-interface-v5/json/gallery.json?platform=android&installversion=5.6.9.4&channelno=WDJTA2320480100&mid=5284047f4ffb4e04824a2fd1d1f0cd62&uid=3125&sid=ddeb07ea-e109-409d-80cf-8f9feee89196&type=3&id=";
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.content_funny_news_activity);

        webView = (WebView) findViewById(R.id.wv_title);

        Intent intent = getIntent();
        String Id = intent.getStringExtra("ID");
        webView.getSettings().setJavaScriptEnabled(true);
        webView.setWebViewClient(new WebViewClient() {
            @Override
            public boolean shouldOverrideUrlLoading(WebView view, String url) {
                view.loadUrl(url);
                return true;
            }
        });
        webView.loadUrl(Id);

    }
}
